﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Data.SqlServerCe;
using ErikEJ.SqlCe;
using System.Data;

namespace GDF_kaart_inlezen
{
    class DbConn
    {
        //hoi nicky
        private SqlCeConnection con;
        public List<string> queue; 

        public DbConn()
        {
            
            con = new SqlCeConnection(@"Data Source = C:\Users\Jeff\Documents\test.sdf");
            con.Open();
        }

        public void execute(string query)
        {
            SqlCeCommand comm = new SqlCeCommand(query);
            comm.Connection = con;
            comm.ExecuteNonQuery();
        }

        private static void DoBulkCopy(bool keepNulls, DataTable reader)
        {
            SqlCeBulkCopyOptions options = new SqlCeBulkCopyOptions();
            if (keepNulls)
            {
                options = options |= SqlCeBulkCopyOptions.KeepNulls;
            }

            using (SqlCeBulkCopy bc = new SqlCeBulkCopy(@"Data Source = C:\Users\Jeff\Documents\test.sdf", options))
            {
                bc.DestinationTableName = "tabel";
                bc.WriteToServer(reader);
            }
        }
    }
}
